<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 测试实例 - 菜鸟教程(runoob.com)</title>
<script src="https://cdn.staticfile.org/vue/3.2.36/vue.global.min.js"></script>
</head>
<body>
<div id="app">
  <div v-nsu="{name:'成都东软',url:'https://nsu.edu.cn/'}"></div>
</div>

<script>
  const app = {
    data(){
      return {

      }
    },
    directives:{
      nsu:{
        mounted(el, binding, vnode){
          console.log("1 fo mounted")
          console.log("el:",el)
          console.log("binding:",binding)
          console.log("vnode:",vnode)

          console.log("binding.value.name:",binding.value.name)
          console.log("binding.value.url:",binding.value.url  )
          console.log("binding.value:",binding.value)
          var s = JSON.stringify
          el.innerHTML = s(binding.value)
        },
      },
    }
  }
  Vue.createApp(app).mount("#app")
</script>
</body>
</html>
